/*
 * Copyright 2011 Angel Sanadinov
 *
 * This file is part of VBox WMI.
 *
 * VBox WMI is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * VBox WMI is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with VBox WMI.  If not, see <http://www.gnu.org/licenses/>.
 */

package Beans.Responses.DataRetrievalComponents;

import Beans.LogBean;

/**
 * This class represents log data, when retrieved from he system.
 *
 * @author Angel Sanadinov
 */
public class LogDataComponent extends DataRetrievalComponent
{
    private LogBean logData; //actual log data

    /**
     * Constructs a log data component using the specified data.
     *
     * @param logData the log data
     */
    public LogDataComponent(LogBean logData)
    {
        this.logData = logData;
    }

    /**
     * Retrieves the log data associated with this object.
     *
     * @return the log data
     */
    public LogBean getLogData()
    {
        return logData;
    }

    @Override
    public boolean isValid()
    {
        //LogBean.isValid() always returns true but that might change in the future
        if(logData != null && logData.isValid())
            return true;
        else
            return false;
    }

    @Override
    public String toString()
    {
        return logData.toString();
    }
}
